package com.common.util.repay_plan;

import com.common.util.date.DateStyle;
import com.common.util.date.DateUtil;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @describe: 还款计划
 */
public class RepayPlan {
    /**
     * 本期开始时间,计息开始时间
     */
    private Date startDate;
    /**
     * 本期结束时间,注意并不是还款日,只是还款计划的结束时间
     */
    private Date endDate;
    /**
     * 本期应还本金
     */
    private BigDecimal principal;
    /**
     * 本期应还利息
     */
    private BigDecimal interest;
    /**
     * 剩余本金包含本期的本金
     */
    private BigDecimal lastPrincipal;
    /**计息天数*/
    private Integer interestDays;

    public Integer getInterestDays() {
        return interestDays;
    }

    public void setInterestDays(Integer interestDays) {
        this.interestDays = interestDays;
    }

    public BigDecimal getLastPrincipal() {
        return lastPrincipal;
    }

    public void setLastPrincipal(BigDecimal lastPrincipal) {
        this.lastPrincipal = lastPrincipal;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public BigDecimal getPrincipal() {
        return principal;
    }

    public void setPrincipal(BigDecimal principal) {
        this.principal = principal;
    }

    public BigDecimal getInterest() {
        return interest;
    }

    public void setInterest(BigDecimal interest) {
        this.interest = interest;
    }

    @Override
    public String toString() {
        return "RepayPlan{" +
                "  lastPrincipal=" + lastPrincipal +
                ", startDate=" + DateUtil.DateToString(startDate, DateStyle.YYYY_MM_DD_HH_MM_SS_CN) +
                ", endDate=" + DateUtil.DateToString(endDate, DateStyle.YYYY_MM_DD_HH_MM_SS_CN) +
                ", principal=" + principal +
                ", interest=" + interest +
                ", interestDays=" + interestDays +
                '}';
    }
}
